package com.itheima.health.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.itheima.health.common.Result;
import com.itheima.health.service.SetmealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author cfr
 * @date 2022/1/6
 * @TIME:19:48
 */
@RestController
@RequestMapping("/setmeal")
public class SetmealController {
    @Autowired
    private SetmealService setmealService;

    @GetMapping("/getAllSetmeal.do")
    public Result getAllSetmeal() {
        return new Result(true, "查询成功", setmealService.list());
    }
    @PostMapping("/findById.do")
    public Result findById(Integer id){

        return new Result(true,"查询成功" ,setmealService.findById(id));
    }
}
